//package com.gutou.mianshibang.config;
//
//import com.alibaba.csp.sentinel.adapter.servlet.CommonFilter;
//import com.alibaba.csp.sentinel.annotation.aspectj.SentinelResourceAspect;
//import org.springframework.boot.web.servlet.FilterRegistrationBean;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//@Configuration
//public class SentinelConfig {
//
//    @Bean
//    public SentinelResourceAspect sentinelResourceAspect() {
//        return new SentinelResourceAspect();
//    }
//
//    @Bean
//    public FilterRegistrationBean<CommonFilter> sentinelCommonFilter() {
//        FilterRegistrationBean<CommonFilter> bean = new FilterRegistrationBean<>(new CommonFilter());
//        bean.addUrlPatterns("/*");
//        bean.setName("sentinelFilter");
//        bean.setOrder(1);
//        return bean;
//    }
//}